#!/bin/sh

CFLAGS='-D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -pthread -g -Wall'
LDFLAGS='-L/lib -lfuse -ldl -lssl'

EXES='on-disk'

run(){
    echo "$*"
    $*
}

compile(){
    run gcc $CFLAGS -c $1
}
link(){
    run gcc -o ${1%.o} $* $LDFLAGS 
}

if [ x$1 = xclean ] ; then
    rm -f $EXES
else
    compile my-on-disk.c
    compile misc.c
    link my-on-disk.o misc.o
fi

